 /// @file InterOpRouthness.h
 /// @brief InterOpRouthness 
 /// @copyright Copyright (c) 2025  Hefei Jiushao Intelligent Technology Co., Ltd. All rights reserved.
 /// @createtime 2025-04-07

#ifndef INTEROPROUTHNESS_H
#define INTEROPROUTHNESS_H
#include "InterOpPMIBase.h"
#include "vector"

namespace  AMCAX::Exchange::InterOp::PMI {

    /// Enum for roughness obtention type
    enum class PMIRoughnessObtentionType
    {
        UnSupported,
        NotDefined,
        MachiningMandatory,
        MachiningForbidden
    };

    /// Enum for roughness applicability type
    enum class PMIRoughnessApplicabilityType{
        UnSupported,
        SpecifiedSurfaceOnly,
        AllPartSurfaces,
        BasicSurface
    } ;

    #define IS_InterOpRoughness(BasePtr) IS_DERIVED_SHARED_PTR(BasePtr, AMCAX::Exchange::InterOp::PMI::InterOpRoughness)
    #define Cast_InterOpRoughness(BasePtr) SAFE_SHARED_PTR_CAST(BasePtr, AMCAX::Exchange::InterOp::PMI::InterOpRoughness)
    class InterOpRoughness : public InterOpPMIAnnotation
    {
    public:
        ~InterOpRoughness() = default;

        PMIAnnotationType GetType() const override
        {
            return PMIAnnotationType::Roughness;
        } 

        /// @brief Set the obtention type of the roughness.
        /// @param[in] obtentionType The obtention type to set.
        void SetRoughnessObtentionType(const PMIRoughnessObtentionType &obtentionType){
            this->obtentionType = obtentionType ;
        } ;

        void SetRoughnessApplicabilityType(const PMIRoughnessApplicabilityType &applicabilityType){
            this->applicabilityType = applicabilityType ;
        } ;

        void AddRoughnessField(const std::string &field){
            this->roughnessField.push_back(field) ;
        } ;
        /// @brief Get the obtention type of the roughness.
        /// @return The obtention type.
        PMIRoughnessObtentionType GetRoughnessObtentionType() const {
            return obtentionType;
        }

        /// @brief Get the applicability type of the roughness.
        /// @return The applicability type.
        PMIRoughnessApplicabilityType GetRoughnessApplicabilityType() const {
            return applicabilityType;
        }

        /// @brief Get the list of roughness fields.
        /// @return The vector of roughness fields.
        const std::vector<std::string>& GetRoughnessField() const {
            return roughnessField;
        }
    private:
        /// The type of the roughness obtention.
        PMIRoughnessObtentionType obtentionType ;
        /// The type of the roughness applicability.
        PMIRoughnessApplicabilityType applicabilityType ;
        /// The list of roughness fields.
        std::vector<std::string> roughnessField ;
    } ;

}

#endif